

$padding: 7px;
$arrowRelative: 20px + $padding;

.Yep-popover__trigger {
  cursor: pointer;
  user-select: none;
}

.Yep-popover__trigger--disabled,
.Yep-popover__trigger--disabled * {
  background-color: #eceff1!important;
  border-color: #eaeaea!important;
  cursor: not-allowed!important;
  color: #999!important;
  user-select: none;
}

.Yep-popover {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 9999;
  &:after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
  }
}

.Yep-popover--animation {
  animation: Yep-popover .15s;
}

@keyframes Yep-popover {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.Yep-popover--up {
  padding-bottom: $padding;
  margin-top: -$padding;
  &:after {
    left: 50%;
    bottom: 1px;
    margin-left: -$padding;
    border-left: $padding solid transparent;
    border-right: $padding solid transparent;
    border-top: $padding - 1px solid #fff;
  }
}

.Yep-popover--down {
  padding-top: $padding;
  &:after {
    left: 50%;
    top: 1px;
    margin-left: -$padding;
    border-left: $padding solid transparent;
    border-right: $padding solid transparent;
    border-bottom: $padding - 1px solid #fff;
  }
}

.Yep-popover--left {
  padding-right: $padding;
  &:after {
    top: 50%;
    right: 1px;
    margin-top: -$padding;
    border-top: $padding solid transparent;
    border-bottom: $padding solid transparent;
    border-left: $padding - 1px solid #fff;
  }
}

.Yep-popover--right {
  padding-left: $padding;
  &:after {
    top: 50%;
    left: 1px;
    margin-top: -$padding;
    border-top: $padding solid transparent;
    border-bottom: $padding solid transparent;
    border-right: $padding - 1px solid #fff;
  }
}

.Yep-popover--align-left {
  &:after {
    left: $arrowRelative;
  }
}

.Yep-popover--align-right {
  &:after {
    left: auto;
    right: $arrowRelative;
  }
}

.Yep-popover--align-top {
  &:after {
    top: $arrowRelative;
  }
}

.Yep-popover--align-bottom {
  &:after {
    top: auto;
    bottom: $arrowRelative;
  }
}

.Yep-popover__content {
  padding: 10px 12px;
  background: #fff;
  border-radius: 2px;
  word-wrap: break-word;
  box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, .25);
  overflow: auto;
}
